package com.etone.system.service.impl;

import java.util.List;
import com.etone.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.etone.system.mapper.FiveCtuRrecordMapper;
import com.etone.system.domain.FiveCtuRrecord;
import com.etone.system.service.IFiveCtuRrecordService;

/**
 * CTU入库记录Service业务层处理
 * 
 * @author etone
 * @date 2025-05-27
 */
@Service
public class FiveCtuRrecordServiceImpl implements IFiveCtuRrecordService 
{
    @Autowired
    private FiveCtuRrecordMapper fiveCtuRrecordMapper;

    /**
     * 查询CTU入库记录
     * 
     * @param id CTU入库记录主键
     * @return CTU入库记录
     */
    @Override
    public FiveCtuRrecord selectFiveCtuRrecordById(Long id)
    {
        return fiveCtuRrecordMapper.selectFiveCtuRrecordById(id);
    }

    /**
     * 查询CTU入库记录列表
     * 
     * @param fiveCtuRrecord CTU入库记录
     * @return CTU入库记录
     */
    @Override
    public List<FiveCtuRrecord> selectFiveCtuRrecordList(FiveCtuRrecord fiveCtuRrecord)
    {
        return fiveCtuRrecordMapper.selectFiveCtuRrecordList(fiveCtuRrecord);
    }

    /**
     * 新增CTU入库记录
     * 
     * @param fiveCtuRrecord CTU入库记录
     * @return 结果
     */
    @Override
    public int insertFiveCtuRrecord(FiveCtuRrecord fiveCtuRrecord)
    {
        fiveCtuRrecord.setCreateTime(DateUtils.getNowDate());
        return fiveCtuRrecordMapper.insertFiveCtuRrecord(fiveCtuRrecord);
    }

    /**
     * 修改CTU入库记录
     * 
     * @param fiveCtuRrecord CTU入库记录
     * @return 结果
     */
    @Override
    public int updateFiveCtuRrecord(FiveCtuRrecord fiveCtuRrecord)
    {
        return fiveCtuRrecordMapper.updateFiveCtuRrecord(fiveCtuRrecord);
    }

    /**
     * 批量删除CTU入库记录
     * 
     * @param ids 需要删除的CTU入库记录主键
     * @return 结果
     */
    @Override
    public int deleteFiveCtuRrecordByIds(Long[] ids)
    {
        return fiveCtuRrecordMapper.deleteFiveCtuRrecordByIds(ids);
    }

    /**
     * 删除CTU入库记录信息
     * 
     * @param id CTU入库记录主键
     * @return 结果
     */
    @Override
    public int deleteFiveCtuRrecordById(Long id)
    {
        return fiveCtuRrecordMapper.deleteFiveCtuRrecordById(id);
    }
}
